export const filterRoutes = (routesList, auth) => {
  console.log(auth);
  if (auth === "管理员") {
    return routesList;
  } else {
    const res = routesList.filter((item) => {
      console.log(item);
      return item.meta.auth.indexOf(auth) !== -1;
    });

    res.length &&
      res.forEach((item) => {
        item.children && filterRoutes(item.children, auth);
      });

    return res;
  }
};
